-
-
Notifications
You must be signed in to change notification settings - Fork 32k
test_runner: make mock.module
's specifier
consistent with import()
#54416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The previous implementation was trying to follow both `require` and `import` conventions. It is not practical to try to follow both, and aligning with `import()` seems to be what makes the most sense.
Review requested:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #54416 +/- ##
==========================================
- Coverage 87.33% 87.32% -0.01%
==========================================
Files 648 648
Lines 182321 182324 +3
Branches 34971 34980 +9
==========================================
+ Hits 159222 159223 +1
+ Misses 16374 16373 -1
- Partials 6725 6728 +3
|
benjamingr
approved these changes
Aug 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (sans the lint errors obv)
MoLow
approved these changes
Aug 20, 2024
Landed in 68e94c1 |
RafaelGSS
pushed a commit
that referenced
this pull request
Aug 25, 2024
The previous implementation was trying to follow both `require` and `import` conventions. It is not practical to try to follow both, and aligning with `import()` seems to be what makes the most sense. PR-URL: #54416 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
dont-land-on-v20.x
PRs that should not land on the v20.x-staging branch and should not be released in v20.x.
needs-ci
PRs that need a full CI run.
test_runner
Issues and PRs related to the test runner subsystem.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The previous implementation was trying to follow both
require
andimport
conventions. It is not practical to try to follow both, and aligning withimport()
seems to be what makes the most sense. It would allow us to greatly simplify the internal loader.For Unix paths, it barely makes a difference (only if the path contains special URL chars such as
?
,#
, or%
). For Windows, it means you need to use/
instead of\
for path delimiter, and escape any#
or%
char. In my experience, folks really only mock either relative paths, or bare specifiers (i.e. module from anode_modules
package), so I don't expect this change to be breaking.Refs: #54223 (comment)